/**
 * Interface to specify the basic operations of the magic backpack.
 * 
 * @author (Thomas KOBER) 
 * @author (Dilyan GEORGIEV)
 * 
 * @version (1.0)
 */
import java.util.NoSuchElementException;

public interface MagicBackpack<E> {

    /**
     * Add element to the backpack.
     * @param element to add to the backpack.
     */
    public void put(E element);
    
    /**
     * Take element from the backpack.
     * @return first element of the backpack and removes it from the backpack.
     * @throws NoSuchElementException if backpack is empty.
     */
    public E take() throws NoSuchElementException;
    
    /**
     * Returns the number of items in the backpack.
     * @return the number of items in the backpack.
     */
    public int size();
    
    /**
     * Checks whether or not the backpack is empty.
     * @return true if the backpack is empty, false otherwise.
     */
    public boolean isEmpty();
    
    /**
     * Checks whether or not the backpack is full.
     * @return true if the backpack is full, false otherwise.
     */
    public boolean isFull();
    
    /**
     * Returns the first element from the backpack without removing it.
     * @return first element form the backpack.
     * @throws NoSuchElementException if the backpack is empty.
     */
    public E first() throws NoSuchElementException;
    
    /**
     * Returns a String token representing the current type of the backpack.
     * @return a String token representing the current type of the backpack.
     */
    public String getDisplayType();
    
}
